﻿@model IEnumerable<SklepISI.Core.Models.CategoryModel>

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "ListCategories";
}

<div class="span8 well">
    <h2>Kategorie</h2>
    @Html.ActionLink("Dodaj kategorię", "AddCategory", null, new { @class = "btn btn-primary", @id = "button-margin" })<br />
    <div class="span1">
        <b>ID</b>
    </div>
    <div class="span3">
        <b>Nazwa</b>
    </div>
    <div class="span3">
        <b>Akcje</b>
    </div>

    @foreach (var category in Model)
    {
            <div class="span1">
                @Html.DisplayFor(modelItem => category.Id)
            </div>
            <div class="span3">
                @Html.DisplayFor(modelItem => category.Name)
            </div>
            <div class="span3">
                @Html.ActionLink("Edytuj", "EditCategory", new { id = category.Id })
            </div>
    }
</div>